@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">

        <div class="col-md-12">

            @foreach ($room_type as $type)
            <div class="card">
                <div class="card-header"><span class="h5">{{$type->name}}</span><span style="float:right;"><a href="">>>更多</a></span>
                </div>

                <div class="card-body">

                    <div class="row" style="text-align: center;">
                        @foreach ($room_list[$type->type_id] as $room)
                            <div class="col-6 col-md-3">
                                    @if($room->img)
                                    ​<picture>
                                        <a href="{{ url('/liveRoom/'.$room->id) }}">
                                            <source srcset="{{ asset($room->img) }}" type="image/svg+xml">
                                            <img src="{{ asset($room->img) }}" class="img-fluid img-thumbnail" alt="{{$room->title}}">
                                        </a>
                                     </picture>
                                    @else
                                    <div class="p-lg-4 mb-3 bg-info">
                                        <a href="{{ url('/liveRoom/'.$room->id) }}" class="text-white">{{$room->title}}</a>
                                    </div>
                                    @endif

                            </div>
                        @endforeach
                    </div>


                </div>
            </div>
                <br>
            @endforeach
        </div>
    </div>

    {{--<div class="bd-example">--}}
        {{--<span class="border border-primary">1</span>--}}
        {{--<span class="border border-secondary">2</span>--}}
        {{--<span class="border border-success">3</span>--}}
        {{--<span class="border border-danger">4</span>--}}
        {{--<span class="border border-warning">5</span>--}}
        {{--<span class="border border-info">6</span>--}}
        {{--<span class="border border-light">7</span>--}}
        {{--<span class="border border-dark">3</span>--}}
        {{--<span class="border border-white">4</span>--}}
    {{--</div>--}}

</div>
@endsection
